
use "$dataDir/dataset_admin_fabrica", clear

*Regressions in levels			
		local depvar "sugarcaneprocessedraw  total_sugar_production"
		local indepvar "treatment "
	local cluslvl "id_mills"
	foreach vd in `depvar' {
		foreach vi in `indepvar'{
	reghdfe `vd' `vi'X2012 `vi'X2013 `vi'X2015 `vi'X2016 `vi'X2017  `vi'X2014, abs(id_mills i.year#i.month) vce(cluster `cluslvl')
		local vtext : variable label `vd'
coefplot, keep(`vi'X2012 `vi'X2013 `vi'X2014 `vi'X2015 `vi'X2016 `vi'X2017) vertical xlabel(, angle(vertical)) yline(0, lcolor(black)) graphregion(color(white)) omitted order(`vi'X2012 `vi'X2013 `vi'X2014 `vi'X2015 `vi'X2016 `vi'X2017) ciopts(recast(rcap) color(sea)) recast(connected) color(sea) ytitle(Difference regulated and unregulated facilities, size(small)) level(95)
			graph export "$mainDir/figures/FigA6_eventstudy_outputs_`vd'.pdf", as(pdf) replace
}
}		